using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using T2.WebSecurity.Data.Entities.Interfaces;
using T2.WebSecurity.Data.Entities;
using T2.WebSecurity.Business.Entities.Interfaces;
using T2.WebSecurity.Business.Entities;
using T2.WebSecurity.Business.Entities.Search.Interfaces;
using T2.WebSecurity.Data.Entities.Search.Interfaces;
using T2.WebSecurity.Data.Entities.Search;


//--Change Management Control - DomainName Business Translator  --**********************
//--Created By: trooks
//--Description: DomainName Translator
//--Created Date: 03/07/2013 10:49:22
//--*************************************************************

namespace T2.WebSecurity.Business.Translators
{
	public static class DomainNameTranslator 
	{
		public static IDomainName TranslateToDataLayer(IDomainName_biz _translateFrom)
        {
            IDomainName temp = new DomainName();

		
			if(_translateFrom != null)
			{
			temp.Action = _translateFrom.Action;
			temp.Caller = _translateFrom.Caller;
			temp.Role = _translateFrom.Role;
			temp.PageSize = _translateFrom.PageSize;
			temp.PageNumber = _translateFrom.PageNumber;
			temp.SortColumn = _translateFrom.SortColumn;
			temp.SortType = _translateFrom.SortType;
			temp.TotalRows = _translateFrom.TotalRows;
			temp.DomainNameID = _translateFrom.DomainNameID;
			temp.EmailDomain = _translateFrom.EmailDomain;
			temp.DomainDeny = _translateFrom.DomainDeny;
			temp.TS = _translateFrom.TS;
			temp.CreatedBy = _translateFrom.CreatedBy;
			temp.CreatedDt = _translateFrom.CreatedDt;
			temp.ModifiedBy = _translateFrom.ModifiedBy;
			temp.ModifiedDt = _translateFrom.ModifiedDt;
			}
            return temp;
        }
		
		public static IDomainNameSearch TranslateSearchToDataLayer(IDomainNameSearch_biz _translateFrom)
        {
            IDomainNameSearch temp = new DomainNameSearch();
		
			if(_translateFrom != null)
			{
			temp.Action = _translateFrom.Action;
			temp.Caller = _translateFrom.Caller;
			temp.Role = _translateFrom.Role;
			temp.PageSize = _translateFrom.PageSize;
			temp.PageNumber = _translateFrom.PageNumber;
			temp.SortColumn = _translateFrom.SortColumn;
			temp.SortType = _translateFrom.SortType;
			temp.TotalRows = _translateFrom.TotalRows;
			temp.EmailDomain = _translateFrom.EmailDomain;
			}
            return temp;
        }

        public static IDomainName_biz TranslateFromDataLayer(IDomainName _translateFrom)
        {
            IDomainName_biz temp = new DomainName_biz();
			if(_translateFrom != null)
			{
			temp.Action = _translateFrom.Action;
			temp.Caller = _translateFrom.Caller;
			temp.Role = _translateFrom.Role;
			temp.PageSize = _translateFrom.PageSize;
			temp.PageNumber = _translateFrom.PageNumber;
			temp.SortColumn = _translateFrom.SortColumn;
			temp.SortType = _translateFrom.SortType;
			temp.TotalRows = _translateFrom.TotalRows;
			temp.DomainNameID = _translateFrom.DomainNameID;
			temp.EmailDomain = _translateFrom.EmailDomain;
			temp.DomainDeny = _translateFrom.DomainDeny;
			temp.TS = _translateFrom.TS;
			temp.CreatedBy = _translateFrom.CreatedBy;
			temp.CreatedDt = _translateFrom.CreatedDt;
			temp.ModifiedBy = _translateFrom.ModifiedBy;
			temp.ModifiedDt = _translateFrom.ModifiedDt;
			}
            return temp;
        
        }
	
	}
	
}
